package com.maiikun.hash_demo;

import com.maiikun.hash_demo.MyHashMap;

import java.util.HashMap;

public class Main {
    public static void main(String[] args) {

        long begin = System.currentTimeMillis();

//        HashMap<Integer,Integer> map = new HashMap<>();
        MyHashMap<Integer,Integer> map = new MyHashMap<>();

        int count = 1000000;
        for (int i = 0; i < count; i++) {
            map.put(i,i);
        }

        System.out.println(map.size() == count);


        for (int i = 0; i < count; i++) {
            Integer i1 = map.get(i);
//            System.out.println(.equals(i));
        }

        Integer remove = map.remove(2);
        System.out.println(remove.equals(2));
        System.out.println(map.get(2) == null);

        System.out.println(map.size() == count - 1);

        long end = System.currentTimeMillis();
        System.out.println(end - begin);

    }
}
